#include <assert.h>
#include "organizationao_factory.h"
#include "organizationao_stub4web.h"
#include "organizationao_stub4app.h"
//#include "organizationao.h"

using namespace erp::organization::ao;

bool COrganizationAoFactory::s_OrganizationAoInit = false;

IOrganizationAo* COrganizationAoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new COrganizationAoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_OrganizationAoInit)
        {
            int iRetCode = COrganizationAo::Initialize();
            assert(iRetCode == 0);
            s_OrganizationAoInit = true;
        }   	
        return (new COrganizationAo);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IOrganizationAoAsyc* COrganizationAoFactory::GetAsycObject()
{
	return (new COrganizationAoStub4App);
}
